#include <stdio.h>
#include <stdint.h>

int main(){
	uint16_t pitch = 0;
	uint16_t roll = 0;
	uint16_t yaw = 0;
	uint16_t thrust = 400;
	uint16_t control = int(0b0000);

	control |= 0b1000; // Thurst
	// control |= 0b0100; Yaw
	// control |= 0b0010; Row
	// control |= 0b0001; Pitch

	uint16_t a = pitch + roll + yaw + thrust + control + 0xAAAA;

	printf("pitch 	HEX: %04x\n",pitch);
	printf("roll 	HEX: %04x\n",roll);
	printf("yaw 	HEX: %04x\n",yaw);
	printf("thrust 	HEX: %04x\n",thrust);
	printf("control HEX: %04x\n",control);
	printf("extra 	HEX: %04x\n", 0xAAAA);

	printf("Chksum 	HEX: %04x 	DEC: %d\n",a,a);

	return 0;
}
